Automatic File Sorter Project

In this python project, we sort files in a folder moving them to associated folders creating an automatic file sorting system. Here is a step to step walk through of the project.

  1. Importing relevant python modules
  2. We start by importing the relevant python modules that will be used to create this system. These modules are; os and shutil. The os module provides a way to interact with the operating system and the shutil module provides a higher level of operation than the os module and it is used for copying and removing files and directories among other things.

    Fullscreen Image

  3. Defining the Path to our Folder
  4. The next stop was to define the path of the folder with the files We want to sort.

    Fullscreen Image

  5. Files present
  6. I then tried to find out the files present in the path defined and assigned a variable to it.

    Fullscreen Image

  7. Creating Folders
  8. I then wrote a code to create folders that will be used to hold files of similar properties.

    Fullscreen Image

  9. Moving Files
  10. We then move files the files to the created folders by first confirming if the files exist in the new created folder and if not, it is then moved.

    Fullscreen Image

    To download and view the full project on GitHub, click here.